#include "Florest.h"

const int Florest::numeroArvoresEmX = 10;
const int Florest::numeroArvoresEmZ = 10;
const int Florest::numeroTocosEmX = 5;
const int Florest::numeroTocosEmZ = 5;
const int Florest::xInicial = 20;
const int Florest::yInicial = 1;
const int Florest::zInicial = -20;
const int Florest::incX = 8;
const int Florest::incZ = 8;

Florest::Florest()
{
    growTrees();
    growLogs();
    init();
}

void Florest::growTrees()
{
    Tree* arvore = new Tree(xInicial,yInicial,zInicial);
    arvores.push_front(*arvore);

    for(int x = 0; x < numeroArvoresEmX; x++)
    {
        for(int z = 0; z < numeroArvoresEmZ; z++)
        {
            arvores.push_back(*arvore);
            arvore = new Tree(xInicial + incX * x, yInicial, zInicial + incZ * z);
        }
    }

}

void Florest::growLogs()
{
    WoodLog* toco;

    for(int x = 0; x < numeroTocosEmX; x++)
    {
        for(int z = 0; z < numeroTocosEmZ; z++)
        {
            toco = new WoodLog(xInicial - incX * x, yInicial, zInicial - incZ * z);
            tocos.push_back(*toco);
        }
    }
}

void Florest::init()
{

}
